import java.util.Scanner;

public class Main1 {
    public static int divisor(int a, int b) {
        int c = a % b;
        while (c != 0) {
            a = b;
            b = c;
            c = a % b;
        }
        return b;
    }


    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        while (scanner.hasNextInt()) {
            int n = scanner.nextInt();
            int able = scanner.nextInt();
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = scanner.nextInt();
                if (able >= arr[i]) {
                    able += arr[i];
                } else {
                    able += divisor(able, arr[i]);
                }
            }
            System.out.println(able);
        }
    }
}
